﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CoyoEden.Web.Controls;
using System.Text;

public partial class Views_CommunityView :CommunityViewBase
{
	public string NewTopicsHtml { get; set; }
	protected void Page_Load(object sender, EventArgs e)
	{
		if ((Topics == null) || (Topics.Count == 0))
		{
			NewTopicsHtml = "<h3 class=\"notice\">此社区还没有任何主题...</h3>";
		}
		else {
			StringBuilder html = new StringBuilder();
			html.Append("<ul>");
			NewTopics(5).ForEach(t => {
				html.AppendFormat("<li>{0}</li>",t.Title);
			});
			html.Append("</ul>");
			NewTopicsHtml = html.ToString();
		}
	}
}
